﻿@model MSAcademic.v2.Web.Areas.Admin.Models.Login.SignInModel

@{
    ViewBag.Title = "Prijava";
}

<script type="text/javascript">
    $(function () {
        $('#IsLongSession').prop('checked', true);

        $('.password-recovery-link a').on('mousedown', function () {
            msacademic.dialogPopup( $(this).data('url') );
        })
    });
</script>



<img src="~/Areas/Admin/Content/Images/admin-logo.png" />

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    @Html.TextBoxFor(x => x.Username, new { @placeholder = "Upiši svoje korisničko ime" })
    @Html.ValidationMessageFor(x => x.Username)

    @Html.PasswordFor(x => x.Password, new { @placeholder = "Upiši svoju lozinku, dužu od 30 znakova nadamo se" })
    @Html.ValidationMessageFor(x => x.Password)

    if (Model.HasAuthenticationErrors)
    {
        <p class="important-validation-error"> Ne postoji korisnik s tim podacima! </p>
    }    
    
    <div class="actions-wrapper"> 
        <a class="positive submit">Beam me up Scotty! <i class="icon-arrow-right"></i></a> 

        <div class="IsLongSession">
            @Html.LabelFor(x => x.IsLongSession, "Zapamti me na 30 dana")
            @Html.EditorFor(x => x.IsLongSession)
            @Html.ValidationMessageFor(x => x.IsLongSession)
        </div>
    </div>
    
    <div class="password-recovery-link"><a href="@Url.RouteUrl("AdminRequestPasswordReset")">Zaboravio sam lozinku</a></div>
    
}

